//package com.zsjt.yysapi.common.config;
//
//import lombok.Data;
//import org.apache.http.HttpHost;
//import org.elasticsearch.client.RestClient;
//import org.elasticsearch.client.RestHighLevelClient;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Data
//@Configuration
//@ConfigurationProperties(prefix = "elasticsearch")
//public class ElasticSearchConfig {
//
//    private String hostname;
//
//    private Integer port;
//
//    private String scheme;
//
//    //注册es客户端
//    @Bean
//    public RestHighLevelClient restHighLevelClient() {
//        return new RestHighLevelClient(
//                RestClient.builder(
//                        new HttpHost(hostname, port, scheme)
//                )
//        );
//    }
//}
